<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Flowable</title>
</head>

<body>
    <div id="app"></div>
    <!-- <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script> -->
    <script src="./libs/vue.min.js"></script>
    <script src="./libs/axios.min.js"></script>
    <script>
        var app = new Vue({
            el: '#app',
            created() {
                var param = window.location.href.split('&'),
                    nonceStr = param[0].split('nonceStr=')[1],
                    target = param[1].split('target=')[1]
                // axios.post('http://flowable.ripples-uat.crcloud.com:8083/static/task/apis/thirdTenant/getThirdToken',{nonceStr:nonceStr})
                axios.post(window.location.origin + '/static/task/apis/thirdTenant/getThirdToken', { nonceStr: nonceStr })
                    .then(function (res) {
                        var data = res.data
                        if (data) {
                            localStorage.tenant = data.tenant
                            localStorage.Authorization = data.token
                            window.location.href = target
                            localStorage.ExpiresIn = 5999
                        } else {
                            alert('随机数已过期')
                        }
                    })
            }
        })
    </script>
</body>

</html>